import React from 'react';
import {Button, Table} from "antd";
const columns = [
    {
        title: '类型',
        dataIndex: 'type',
        key: 'type',
        render: text=>{
            return (
                <Button type={'link'}>{text}</Button>
            )
        },
    },
    {
        title: '特点',
        dataIndex: 'category',
        key: '特点',
    },
    {
        title: '示例',
        dataIndex: 'sample',
        key: 'sample',
    }
];
const data = [
    {
        key: '1',
        type:'application/x-www-form-urlencoded',
        category: '简单键值对',
        sample: 'name=1&age=1&code=200',
    },
    {
        key: '2',
        type:'application/form-data',
        category: '文件上传，数据以边界分割',
        sample: '',
    },
    {
        key: '3',
        type:'application/json',
        category: 'JSON格式传输',
        sample: `
        {
            name:'lihua',
            age:3,
            code:'1',
        }
        `,
    },
];
export const ContentTypeComp = function () {
    return (
        <>
            <Table columns={columns} dataSource={data} />
        </>
    )

};